﻿<%
'-----------------------------------------网站头部 导航
sub showhead()
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=title%>-<%=SiteName%></title>
<meta name="keywords" content="<%=SiyeKeys%>" />
<meta name="description" content="<%=SiteDes%>" />
<meta name="Author" content="www.zhujianqiang.com" />
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)" />
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)" />
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="css/reset.css"/>
<script type="text/javascript" src="js/date.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<%
pageurl	=	lcase(Request.ServerVariables("SCRIPT_NAME"))
if instr(pageurl,"newlist.asp")>0 then
%>
<link rel="stylesheet" type="text/css" href="<%=Site_Dir%>/Plugin/highslide/highslide.css" />
<script type="text/javascript" src="<%=Site_Dir%>/Plugin/highslide/highslide-with-gallery.min.js"></script>
<%
end if
%>
</head>
<body>
<div id="wrapper">
  <div id="header">
    <ul class="menunav">
      <li><a href="<%=Site_Dir%>/" id="a">首页</a></li>
      <li><a href="info.asp?id=2" id="b">展会概况</a></li>
      <li><a href="newlist.asp?id=1" id="c">展会动态</a></li>
      <li><a href="newlist.asp?id=2" id="d">展会现场</a></li>
      <li><a href="newlist.asp?id=3" id="e">展台照片</a></li>
      <li><a href="info.asp?id=9" id="f" >联系我们</a></li>
      <li class="date"><span>今天是<script language="javascript" type="text/javascript"> document.write(Showdate(new Date(), 'dddd', 'mmmm', 'dd', 'yyyy', ','))</script>
        </span></li>
    </ul>
    <div class="search"> <a href="<%=Site_Dir%>/" class="logo"><img src="images/logo.jpg" width="340" height="64" alt="<%=SiteName%>" border="0"/></a>
      <div class="searchbox">
        <form name="forma" id="forma" method="post" action="newlist.asp" onsubmit="return checkformcn(this)">
          <input name="keywords" type="text" value="站内搜索" onFocus="this.value=''" onblur='if (value ==""){value="站内搜索"}' class="btntxt"/>
          <input type="image" src="images/btnsearch.gif" class="btnsearch"/>
        </form>
      </div>
    </div>
  </div>
<%
end sub
'------------显示页面底部--------------
sub showfoot()
%>
  <div id="bottom">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="54%" valign="top"><a href="http://www.zhujianqiang.com" target="_blank"></a><%=SiteCopy%>&nbsp;&nbsp;<a href="http://www.miibeian.gov.cn/" target="_blank"><%=SiteICP%></a>&nbsp;&nbsp;<%=SiteSupport%>
</td>
    <td width="22%">版本时间：<%=Version_data%></td>
    <td width="24%" valign="top">QQ:1020976367</td>
  </tr>
</table>
<div style="display:none"><a href="http://www.zhujianqiang.com" target="_blank"></a><script src="http://s94.cnzz.com/stat.php?id=1978483&web_id=1978483&show=pic" language="JavaScript"></script>
</div>
  </div>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
var _leftheight = jQuery(".left").height();
_rightheight = jQuery(".right").height();
if(_leftheight > _rightheight ) {
jQuery(".right").height(_leftheight);
}
else {
jQuery(".left").height(_rightheight);
}
})
</script>
<%
pageurl	=	lcase(Request.ServerVariables("SCRIPT_NAME"))
if instr(pageurl,"newlist.asp")>0 then
%>
<script type="text/javascript">
hs.graphicsDir = '<%=Site_Dir%>/Plugin/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.dimmingOpacity = 0.5;

// Add the controlbar
hs.addSlideshow({
	//slideshowGroup: 'group1',
	interval: 5000,
	repeat: false,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		opacity: .5,
		position: 'bottom center',
		hideOnMouseOut: true
	}
});
</script>
<%end if%>
<!-- UJian Button BEGIN -->
<script type="text/javascript" src="http://v1.ujian.cc/code/ujian.js?type=slide&btn=4"></script>
<!-- UJian Button END -->
</body>
</html>

<%
'------------关闭数据库连接
conn.close
set conn = nothing
end sub
'------------------页面左侧栏目----------------
sub showleft()
%> 
      <h3>导航</h3>
      <ul class="productlist">
<% 
	set rs=server.createobject("adodb.recordset") 
	sqlStr="select id,NavTitle,NavRemark from SiteExplain where NavLock=0 and NavParent="&NavParent&" Order By NavOrder Asc"
	rs.open sqlStr,conn,1,1
	If Not (Rs.Eof Or Rs.Bof ) Then
		Do While Not Rs.Eof
			id	=	rs("id")
			NavTitle	=	trim(rs("NavTitle"))
			NavRemark	=	trim(rs("NavRemark"))
	%>
		 <li><a href="info.asp?id=<%=id%>" title="<%=NavRemark%>"><%=NavTitle%></a></li>
	<% 
			Rs.MoveNext
		Loop
	end if
	rs.close
	set rs=nothing
	response.Write("<li><a href=""guestbook.asp"" title=""留言反馈"">留言反馈</a></li>")
	response.Write("</ul>")
%>	
      <h3>最新动态</h3>
      <ul class="infolist">
<% 
	set rs=server.createobject("adodb.recordset") 
	sqlStr="select top 10 id,NewsTitle from NewsInfo where NewsLock=0 Order By NewsOrder desc"
	rs.open sqlStr,conn,1,1
	If Not (Rs.Eof Or Rs.Bof ) Then
		Do While Not Rs.Eof
			id	=	rs("id")
			NewsTitle	=	trim(rs("NewsTitle"))
			SubNewsTitle	=	CutStr(NewsTitle,8)
	%>
		 <li><a href="news.asp?id=<%=id%>" title="<%=NewsTitle%>" target="_blank"><%=SubNewsTitle%></a></li>
	<% 
			Rs.MoveNext
		Loop
	end if
	rs.close
	set rs=nothing
	response.Write("</ul>")
end sub

'------------------新闻列表页面左侧栏目----------------
sub newlistleft()
%>  
      <h3>导航</h3>
      <ul class="productlist">
<% 
	set rs=server.createobject("adodb.recordset") 
	sqlStr="select id,NavTitle,NavRemark from NewsClass where NavLock=0 Order By NavOrder Asc"
	rs.open sqlStr,conn,1,1
	If Not (Rs.Eof Or Rs.Bof ) Then
		Do While Not Rs.Eof
			id	=	rs("id")
			NavTitle	=	trim(rs("NavTitle"))
			NavRemark	=	trim(rs("NavRemark"))
	%>
		 <li><a href="newlist.asp?id=<%=id%>" title="<%=NavRemark%>"><%=NavTitle%></a></li>
	<% 
			Rs.MoveNext
		Loop
	end if
	rs.close
	set rs=nothing
	response.Write("</ul>")
end sub

'----------------------用户面板
sub UserPanel()
  if request.Cookies("cmyusr")<>"" then
%>    <div class="member2">
        <h3>会员中心</h3>
        <p>欢迎您！<span><%=request.Cookies("cmyusr")%></span></p>
        <p><a href="new_product.asp" class="mtxt">最新产品</a></p>
        <p><a href="memchk.asp?exit=yes" class="mtxt" onClick="return confirm('确定要退出吗')">退出</a></p>
      </div>
<%end if
end sub

'----------------------显示文本列表信息
sub ShowTextList()
%>
			<div class="contacts">
            <ul class="newlist">
<%
	keywords	=	ReplaceBadChar(request("keywords"))
	if keywords<>"" then
		sqlwhere	=	" and NewsTitle like '%"&keywords&"%'"
	end if
	if ClassID<>"" then
		sqlwhere	=	sqlwhere&" and ClassID="&ClassID&""
	end if
	sqlstr = "select id,NewsTitle,PostTime from NewsInfo where NewsLock=0 "&sqlwhere&"  order by NewsOrder desc "
	'response.Write(sqlstr)
	set rs=server.CreateObject("adodb.recordset")
	rs.open sqlstr,conn,1,1
		if rs.eof then
			response.Write("<li>暂时没有相关信息!</li>")
		else
			CurrentPage = Request("page")
			if Not IsNumeric(CurrentPage) Then
				CurrentPage = "1"
			end if
			CurrentPage=Cint(CurrentPage)
			rs.PageSize = 20
			If CurrentPage < 1 Then CurrentPage = 1
			If CurrentPage > rs.PageCount Then 
			CurrentPage = rs.PageCount
			end if
			rs.AbsolutePage = CurrentPage
			count=rs.recordcount
			i=0
		do until rs.eof
		id				=	rs("id")
		NewsTitle	=	rs("NewsTitle")
		PostTime	=	formatdatetime(rs("PostTime"),2)
		subNewsTitle	=	CutStr(NewsTitle,20)
	%>            
								<li><span><%=PostTime%></span><a href="news.asp?id=<%=id%>" target="_blank"><%=NewsTitle%></a></li>
	<%
			i=i+1 
			if i >= rs.PageSize Then exit do 
			rs.movenext
			loop
		end if
	%>
							</ul>
              <div>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2143034021767424";
/* expocms */
google_ad_slot = "6958295420";
google_ad_width = 680;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>              
              </div>
							<div class="pages"> <%call showpage("newlist.asp?id="&classid,count,rs.pagesize,currentpage,true,true,"条信息")%></div>
	<%
	rs.close
	set rs = nothing
%>
					</div>
<%	
end sub
'---------------------显示图片列表----------------------
sub ShowPicList()
%>
<div class="contacts highslide-gallery">
<%
	keywords	=	ReplaceBadChar(request("keywords"))
	if keywords<>"" then
		sqlwhere	=	" and NewsTitle like '%"&keywords&"%'"
	end if
	if ClassID<>"" then
		sqlwhere	=	sqlwhere&" and ClassID="&ClassID&""
	end if
	sqlstr = "select id,NewsTitle,PostTime,NewsSPic,NewsBPic from NewsInfo where NewsLock=0 "&sqlwhere&"  order by NewsOrder desc "
	'response.Write(sqlstr)
	set rs=server.CreateObject("adodb.recordset")
	rs.open sqlstr,conn,1,1
		if rs.eof then
			response.Write("<div>暂时没有相关信息!</div>")
		else
			CurrentPage = Request("page")
			if Not IsNumeric(CurrentPage) Then
				CurrentPage = "1"
			end if
			CurrentPage=Cint(CurrentPage)
			rs.PageSize = 12
			If CurrentPage < 1 Then CurrentPage = 1
			If CurrentPage > rs.PageCount Then 
			CurrentPage = rs.PageCount
			end if
			rs.AbsolutePage = CurrentPage
			count=rs.recordcount
			i=0
		do until rs.eof
		id				=	rs("id")
		NewsTitle	=	rs("NewsTitle")
		PostTime	=	formatdatetime(rs("PostTime"),2)
		NewssPic	=	Site_Dir&rs("NewssPic")
		NewsBPic	=	Site_Dir&rs("NewsBPic")
		subNewsTitle	=	CutStr(NewsTitle,10)
	%> 
  <dl>
    <dt><a href="<%=NewssPic%>" class="highslide" onclick="return hs.expand(this)"><img alt="<%=NewsTitle%>" src="<%=NewssPic%>" border="0" /></a></dt>
    <dd><a href="news.asp?id=<%=id%>" target="_blank"><%=NewsTitle%></a></dd>
  </dl>
	<%
			i=i+1 
			if i >= rs.PageSize Then exit do 
			rs.movenext
			loop
		end if
	%>
              <div>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2143034021767424";
/* expocms */
google_ad_slot = "6958295420";
google_ad_width = 680;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>              
              </div>
							<div class="pages"> <%call showpage("newlist.asp?id="&classid,count,rs.pagesize,currentpage,true,true,"条信息")%></div>
	<%
	rs.close
	set rs = nothing
%>
	</div>
<%	
end sub

'--------------------显示文章的上一篇 下一篇--------------------------
sub getnextpre(table,id)
	set gnp=server.createobject("adodb.recordset")
	sqlnext="select top 1 id,NewsTitle from "&table&" where NewsLock=0 and ClassID="&ClassID&" and id<"&id&" order by id desc"
	gnp.open sqlnext,conn,0,1
	if not gnp.eof then
			response.write("<a href='news.asp?id="&gnp("id")&"' title="&gnp("NewsTitle")&"><strong>上一篇：</strong>"&left(gnp("NewsTitle"),20)&"</a><br>")
	else
			response.write("<strong>上一篇：</strong>没有了！<br>")
	end if
	gnp.close
	
	sqlnext="select top 1 id,NewsTitle from "&table&" where NewsLock=0 and ClassID="&ClassID&" and id>"&id&" order by id asc"
	gnp.open sqlnext,conn,0,1
	if not(gnp.eof) then
			response.write("<a href='news.asp?id="&gnp("id")&"' title="&gnp("NewsTitle")&"><strong>下一篇：</strong>"&left(gnp("NewsTitle"),20)&"</a><br>")
	else
			response.write("<strong>下一篇：</strong>没有了！")
	end if
	gnp.close
	set gnp=nothing
end sub
%>